﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Afru.Components.Messaging
{
    /// <summary>
    /// Simplest message type, contains a string, this will mostly be used
    /// for debugging/logging reasons.
    /// </summary>
    public class AMessage
    {
        public int Kind;
        public string Message;

        public AMessage()
        {
            Kind = 0;
            Message = "";
        }
    }

    /// <summary>
    /// Script Run/Return messages. ie a 2 way channel between the scripts and
    /// the game. This allows more complex return types without needing to
    /// over complicate the scripting system.
    /// </summary>
    public class AScriptMessage : AMessage
    {
        //script messages are more complex as they are used to return values to the calling functions...
        //public int Kind;
        //public string Message;
        public object Container;
        public bool Returned;

        public AScriptMessage()
        {
            Returned = false; //set this to true when it is a return value
            Message = ""; //returning script name
            Kind = 1;
            Container = null; //this is the returned object, you will have to
                //cast it as what you want for use in your game engine code.
        }
    }
}
